package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author: wufeng
 * @date: 2018/9/6 14:45
 * @desrcption: 数据详情
 */
@Getter
@Setter
@ToString
public class FormDataGetDTO extends BaseDTO {

    private static final long serialVersionUID = -8283490917706821433L;

    /**
     * 应用id
     */
    private Long appId;

    private Long menuId;
    /**
     * 表单id
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long formId;

    /**
     * 数据id
     */
    @NotNull(message = "{dto.msg.formDataGet.dataId.NotNull}")
    private Long dataId;

    /**
     * saas标记
     */
    private Integer saasMark;

    /**
     * 业务类型
     */
    private Integer businessType;

    /**
     * 子业务类型（月报、周报、日报等）
     */
    private Integer subBusinessType;

    /**
     * 对账日期范围筛选：[1601481600, 1603555199]
     */
    private List<Long> checkingDate;

    /**
     * 对账单id，仅用于对账单打印的特殊逻辑
     */
    private Long statementId;

    /**
     * 关联业务id，（目前用于待系列关联产品id）
     */
    private Long linkId;

    /**
     * 1：打印调用详情接口，0或者0则是非打印
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer isPrint;

    public FormDataGetDTO() {
    }

    public FormDataGetDTO(Long appId, Long menuId, Long formId, @NotNull(message = "{dto.msg.formDataGet.dataId.NotNull}") Long dataId,
                          Integer saasMark, Integer businessType, Integer subBusinessType, UserVO userVO, String corpid) {
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
        this.dataId = dataId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.subBusinessType = subBusinessType;
        setCorpid(corpid);
        setLoginUser(userVO);
    }
}
